home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / CPlusPlus / ODAdrDes.xh < prev    next >
Encoding:
Text File  |  1997-02-13  |  3.5 KB  |  163 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: ODAdrDes.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODAddressDesc_xh
  18. #define SOM_ODAddressDesc_xh
  19.  
  20. class ODAddressDesc;
  21.  
  22. #define ODAddressDesc_MajorVersion 1
  23. #define ODAddressDesc_MinorVersion 0
  24.  
  25. /* C++ SOM defs */
  26. #include <somcls.xh>
  27. #include <somcm.xh>
  28.  
  29. /* C++ parent defs */
  30. #ifndef SOM_ODDesc_xh
  31. #include <ODDesc.xh>
  32. #endif
  33.  
  34. #ifndef ODAddressDesc_API
  35. #define ODAddressDesc_API
  36. /*
  37.  * -- The Class API
  38.  */
  39.  
  40. /*
  41.  * Start of user-defined types:
  42.  */
  43. class SOMClass;
  44. class SOMObject;
  45. class ODFrame;
  46. class ODFacet;
  47. class ODObject;
  48. class ODExtension;
  49. class ODDesc;
  50. class ODAddressDesc;
  51.  
  52. /*
  53.  * End of user-defined types.
  54.  */
  55.  
  56. #ifdef OLDIBMSOMAPISUPPORT
  57. #define ODAddressDescCClassData ODAddressDescClassData
  58. #define ODAddressDescNewClass(major,minor) somNewVersionedClassReference(ODAddressDesc,major,minor)
  59. #endif
  60.  
  61. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  62. #define ODAddressDescMetaClass SOMClass
  63.  
  64. #if PRAGMA_ALIGN_SUPPORTED
  65. #  pragma options align=power
  66. #endif
  67.  
  68. /* The API to the ODAddressDesc class object, and the methods it introduces. */
  69. SOMEXTERN struct ODAddressDescClassDataStructure {
  70. #ifdef OLDIBMSOMAPISUPPORT
  71.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  72. #else
  73.     long zero;
  74. #endif
  75.     somStaticClassInfo *sci;
  76.     somDToken        instanceDataToken;
  77.     long reserved [3];
  78.     somMToken InitODAddressDesc;
  79. } SOMDLINK ODAddressDescClassData;
  80.  
  81. #if PRAGMA_ALIGN_SUPPORTED
  82. #  pragma options align=reset
  83. #endif
  84.  
  85. #if !defined(ODAddressDesc_Class_Source) && !defined(SOM_Module_odadrdes_Source)
  86. #if PRAGMA_IMPORT_SUPPORTED
  87. #pragma import list ODAddressDescClassData
  88. #endif
  89. #endif
  90.  
  91.  
  92. /*
  93.  * -- Typedefs and inline method declarations for left path inherited methods
  94.  * -- are omitted because this compilation had -museinheritedmethods in effect
  95.  */
  96.  
  97.  
  98. /*
  99.  * -- Typedefs for ODAddressDesc Method Procedures
  100.  */
  101. SOMEXTERN {
  102. typedef void   (* SOMLINK somTD_ODAddressDesc_InitODAddressDesc)(ODAddressDesc *somSelf, Environment *ev);
  103. }
  104.  
  105. #endif /* ODAddressDesc_API */
  106.  
  107.  
  108. /*
  109.  * -- This emitter treats Method Tokens as Thunks by default.
  110.  * -- Use the sc modifier "nothunks" to change this default
  111.  */
  112. #undef somresolve_
  113. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  114.  
  115. /*
  116.  * -- The C++ Wrapper Class for ODAddressDesc
  117.  */
  118. class ODAddressDesc : public ODDesc
  119. {
  120. public:
  121.  
  122. // ODAddressDesc::new registers use of the class object, and then uses somNew
  123. // to allocate memory and load the object method table pointer. 
  124. void *operator new(size_t size)
  125. {
  126.     SOM_IgnoreWarning(size);
  127.     // Allocate memory using the default allocator for ODAddressDesc, and
  128.     // clear mem & set method table pointer, call basic initialization
  129. #ifdef SOMCHKNULL
  130.     void * __somResult = (void *)
  131.       somNewObject(ODAddressDesc);
  132.     SOMCHKNULL(__somResult);
  133.     return __somResult;
  134. #else
  135.     return (void*) somNewObject(ODAddressDesc);
  136. #endif
  137. }
  138.  
  139. // ODAddressDesc::delete uses the default deallocator for the object's class.
  140. void operator delete(void * obj)
  141. {
  142.     if (obj) {
  143.         SOM_Resolve(obj,SOMObject,somFree)
  144.            ( (SOMObject*) obj );
  145.     }
  146. }
  147.  
  148. /* method: InitODAddressDesc */
  149. void   InitODAddressDesc(Environment *ev)
  150. {
  151.    SOM_ResolveD(this,ODAddressDesc,ODAddressDesc,InitODAddressDesc)
  152.     (this,ev);
  153. #ifdef SOMCHKEXCEPT
  154.       SOMCHKEXCEPT;
  155. #endif
  156. }
  157.  
  158. };   /* ODAddressDesc */
  159.  
  160.  
  161.  
  162. #endif       /* SOM_ODAddressDesc_xh */
  163.